package com.ays.service;

import com.ays.comm.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

/**
 * @author Administrator
 * @date 2024/6/7
 * @desc 接收平台推送信息xml
 */
@WebService
@Service
public class SendManagerDataInfoService {

    @Autowired
    private HisRequestHandleService hisRequestHandleService;

    /**
     * @deac 科室信息
     * @param request
     * @return
     */
    @WebMethod
    @WebResult(name = "Response")
    public String saveAtmDeptDict(@WebParam(name = "Request") String request) {
        String msg = hisRequestHandleService.handle("AtmDeptDict", request);
        return ResponseUtil.getXml(msg);
    }

    /**
     * @desc 人员字典
     * @param request
     * @return
     */
    @WebMethod
    @WebResult(name = "Response")
    public String saveAtmHisUsers(@WebParam(name = "Request") String request) {
        String msg = hisRequestHandleService.handle("AtmHisUsers",request);
        return ResponseUtil.getXml(msg);
    }

    /**
     * @desc 手术字典
     * @param request
     * @return
     */
    @WebMethod
    @WebResult(name = "Response")
    public String saveAtmOperationDict(@WebParam(name = "Request") String request) {
        String msg = hisRequestHandleService.handle("AtmOperationDict",request);
        return ResponseUtil.getXml(msg);
    }

    /**
     * @desc 手术申请预约信息
     * @param request
     * @return
     */
    @WebMethod
    @WebResult(name = "Response")
    public String saveAtmOperationSchedule(@WebParam(name = "Request") String request) {
        String msg = hisRequestHandleService.handle("AtmOperationSchedule",request);
        return ResponseUtil.getXml(msg);
    }

    /**
     * @desc 病人基本信息
     * @param request
     * @return
     */
    @WebMethod
    @WebResult(name = "Response")
    public String saveAtmPatMasterIndex(@WebParam(name = "Request") String request) {
        String msg = hisRequestHandleService.handle("AtmPatMasterIndex",request);
        return ResponseUtil.getXml(msg);
    }

    /**
     * @desc 住院登记信息
     * @param request
     * @return
     */
    @WebMethod
    @WebResult(name = "Response")
    public String saveAtmPatsInHospital(@WebParam(name = "Request") String request) {
        String msg = hisRequestHandleService.handle("AtmPatsInHospital",request);
        return ResponseUtil.getXml(msg);
    }
}
